package com.wlz.date;

import java.time.LocalDateTime;

/**
 * @author wlz
 * @date 2023-07-04  09:29
 */
public class Test2 {

    public static void main(String[] args) {
//        LocalDateTime lastLoginTime =LocalDateTime.of(2023, 07, 03, 18, 59, 59); 2023-07-04 08:30:33
//        LocalDateTime lastLoginTime = LocalDateTime.of(2023, 07, 04, 8, 30, 33);
        LocalDateTime lastLoginTime =  LocalDateTime.now();
        LocalDateTime logStartTime = LocalDateTime.now().plusHours(-1);
        if (lastLoginTime != null && logStartTime.isBefore(lastLoginTime)) {
            logStartTime = lastLoginTime;
        }
        System.out.println(logStartTime);
    }
}
